import Vue from 'vue';
import moment from 'dayjs';

function dateFormat(date) {
  if (!date) return '';
  return moment(date).format('YYYY/MM/DD');
}

const filters = {
  dateFormat,
};

Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});
